import Vue from 'vue'
import App from './App.vue'
import router from './router'
import store from './store/index'
import mixin from './mixin/mixin'
import './utils/http'
import './utils/filters'
import './utils/regExp'
import './icons/index'
import './permission' // 权限控制
import './utils/error-log' // 错误日志
import components from './components/index.js'
import {
  Row,
  Col,
  Input,
  Dropdown,
  DropdownMenu,
  DropdownItem,
  Breadcrumb,
  BreadcrumbItem,
  Tooltip,
  Message,
  MessageBox,
  Scrollbar,
  Menu,
  MenuItem,
  MenuItemGroup,
  Select,
  Option,
  Button,
  Dialog,
  Checkbox,
  Table,
  TableColumn,
  Pagination,
  Loading,
  DatePicker,
  Form,
  FormItem,
} from 'element-ui'

Vue.mixin(mixin)
Vue.use(components)

Vue.use(Row)
  .use(Col)
  .use(Input)
  .use(Dropdown)
  .use(DropdownMenu)
  .use(DropdownItem)
  .use(Breadcrumb)
  .use(BreadcrumbItem)
  .use(Tooltip)
  .use(Scrollbar)
  .use(Menu)
  .use(MenuItem)
  .use(MenuItemGroup)
  .use(Select)
  .use(Option)
  .use(Button)
  .use(Dialog)
  .use(Checkbox)
  .use(Table)
  .use(TableColumn)
  .use(Pagination)
  .use(Loading)
  .use(DatePicker)
  .use(Form)
  .use(FormItem)

Vue.prototype.$message = Message
Vue.prototype.$alert = MessageBox.alert
Vue.prototype.$confirm = MessageBox.confirm
Vue.prototype.$prompt = MessageBox.prompt

// 复制到粘贴板插件
import VueClipboard from 'vue-clipboard2'

VueClipboard.config.autoSetContainer = true // add this line
Vue.use(VueClipboard)


Vue.config.productionTip = false

store.dispatch('appInit')

export default new Vue({
  router,
  store,
  render: h => h(App)
}).$mount('#app')
